Finds the first parent of a given type for a particular FrameworkElement

Namespace:  C1.Silverlight
Assembly:  C1.Silverlight (in C1.Silverlight.dll)

Syntax

C#
public static T FindParent<T>(
	this FrameworkElement elem
)
where T : FrameworkElement
Visual Basic
<ExtensionAttribute> _
Public Shared Function FindParent(Of T As FrameworkElement) ( _
	elem As FrameworkElement _
) As T

Parameters

elem
Type: System.Windows..::..FrameworkElement

Type Parameters

T

Return Value

Return Value

The first object whose type is

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also